{volist name="answer" id="item"}
<div class="layui-row">
	<div class="answer-userinfo">
		{if $item.user_id eq $loginUser.uid}<div style="margin-bottom: 10px;"><span class="layui-badge">我的回复</span></div>{/if}
		<div style="float: left;" class="portrait-de">{:portrait($item.user_id)}</div>
		<div style="float: left;line-height: 20px;"><p><a href="{:url('wendasns/home/index',['id'=>$item.user_id],false)}" class="userinfo-show" style="margin-right: 5px;font-weight: bold;" data-uid="{$item.user_id}" target="_blank">{$item.users.username}</a></p><p style="color: #9eacb6;font-size: 12px;">{$item.users.members.usersign}</p></div>
		<span style="float: right;">{:range_time($item.create_time)}</span>
	</div>
	<div id="answer-{$item.id}" class="answer-content" style="margin-bottom: 15px;">{$item.content|raw}</div>
	{if $item.user_id eq $loginUser.uid}
		{if $item.status eq 'check'}<div class="answer-status"><blockquote class="layui-elem-quote" style="padding: 5px 10px;border-left: 0px solid #5FB878;"><font color="red">提示：</font> 您的回复正在审核中 ，仅您自己可见。</blockquote></div>{/if}
		{if $item.remove eq 1}<div class="answer-delete"><blockquote class="layui-elem-quote" style="padding: 5px 10px;border-left: 0px solid #5FB878;"><font color="red">提示：</font> 您的回复已被删除 ，仅您自己可见。</blockquote></div>{/if}
		{if $item.adopt eq 1}<div class="answer-adopt" style="background-color: #78c179;color: #FFFFFF;padding: 5px 10px;border-radius: 2px;"><i class="layui-icon layui-icon-vercode"></i> 您的回复被采纳为最佳答案。</div>{/if}
	{/if}
	{if $item.remove eq 0 && $item.status eq 'normal' && $item.adopt eq 0}
	<div class="answer-handle" style="margin-bottom: 10px;">
		{if $loginUser.isLogin && $question.adopt_id eq 0}
			{if $question.user_id eq $loginUser.uid || admin_check('thread.question.adopt')}
				<a href="#adopt_view" class="layui-btn layui-btn-sm layui-btn-warm J_dialog" data-json='{"id":"{$question.id}","aid":"{$item.id}"}' title="采纳" style="color: #ffffff;">采纳</a>
			{/if}
		{/if}
		<a href="{:url('wendasns/answer/praise')}" class="layui-btn layui-btn-sm layui-btn-primary J_req" data-json='{"id":"{$item.id}"}' data-click="praise" style="margin-right: 10px;"><i class="layui-icon layui-icon-praise"></i><font>{$item.praise}</font></a>
		<a href="javascript:;" class="J_comment" style="margin-right: 10px;" data-json='{"id":"{$item.id}","tips":"写下你的评论...","type":"answer"}'><i class="layui-icon layui-icon-reply-fill"></i> 评论(<span id="comment-num-{$item.id}">{$item.comment}</span>)</a>
		{if miniapp() neq true}<a href="#share_view" class="J_req" style="margin-right: 10px;" data-click="share"><i class="layui-icon layui-icon-share"></i> 分享</a>{/if}
		
		{if $loginUser.isLogin}
			{if $item.user_id eq $loginUser.uid || admin_check('thread.answer.edit')}
		<a href="{:url('wendasns/answer/edit')}" onclick="wds.call(this,'editor');return false;" data-json='{"id":"{$item.id}","type":"answer"}' style="margin-right: 10px;"><i class="layui-icon layui-icon-edit"></i> 编辑</a>
			{/if}
			{if $item.user_id eq $loginUser.uid || admin_check('thread.answer.remove')}
		<a href="{:url('wendasns/answer/remove')}" class="J_req" data-json='{"id":"{$item.id}"}' style="margin-right: 10px;" title="确定要删除吗？"><i class="layui-icon layui-icon-delete"></i> 删除</a>
			{/if}
		{/if}
		{if $item.user_id neq $loginUser.uid}<a href="{:url('wendasns/api/report')}" class="J_dialog" style="margin-right: 10px;" data-json='{"id":"{$item.id}","type":"answer"}' title="举报"><i class="layui-icon layui-icon-tips"></i> 举报</a>{/if}
	</div>
	{/if}
	
<!--评论列表-->
<div class="comment-row comment-card-{$item.id}" style="background: #fafafa;display: none;">
	<div class="comment-card-body" style="padding: 10px;">
		{~$comment = $item->comments()}
		<ul id="comment-answer-{$item.id}" class="answer-comment comment-card-list" style="margin-top: 10px;" data-total="{$comment->lastPage()}" data-id="{$item.id}">
		{include file="unify/comment"}
		</ul>
	</div>
</div>
<!--评论列表 end-->
</div>
<hr>
{/volist}
{:hook('question_answer_list_extra')}